<template>
	<view class="t-login">
		<!-- <view class="t-b">{{title}}</view> -->
		<view class="t-a">
			<view>
				<u-icon name="phone" size="58"></u-icon>
			</view>
			<view>
				<input v-model="phone" @focus="isfocus()" placeholder="请输入手机号" />
			</view>
			<view>
				<u-icon v-show='isClose' @click='isCloseData' name="close-circle" size="58"></u-icon>
			</view>
		</view>
		<view class="t-a">
			<view>
				<u-icon name="lock" size="58"></u-icon>
			</view>
			<view>
				<input :password='showpwd' name="pwd" placeholder="请输密码" />
			</view>
			<view>
				<u-icon :name=" showpwd ? 'eye-off' :'eye-fill' " @click='showpwdFunc' size="58"></u-icon>
			</view>
		</view>
		<!-- <view class="t-d">未注册的手机号验证后将自动注册</view> -->
		<button @click="submit">立即登录</button>
		<!-- <view class="t-f">登录即同意<text>用户协议</text></view> -->
	</view>
</template>
<script>
	
	export default {
		data() {
			return {
				title: '欢迎登录账号',
				isClose: false,
				phone: '',
				pwd:'',
				showpwd:false,
			}
		},
		onLoad() {

		},
		methods: {
			isfocus() {
				this.isClose = true
			},
			isCloseData(){
				this.phone = '';
			},
			showpwdFunc(){
				this.showpwd = !this.showpwd
			},
			async submit(){
				const data = await this.MusicRequest('toplist/artist')
				console.log(data);
				// this.uniFunc.Toast('123')
			}
		}
	}
</script>
<style lang="less" scoped>
	.t-login {
		width: 600rpx;
		margin: 0 auto;
		font-size: 28rpx;
		color: #000
	}

	.t-login button {
		margin-top: 50rpx;
		font-size: 28rpx;
		background: #000;
		color: #fff;
		height: 90rpx;
		line-height: 90rpx;
		border-radius: 50rpx
	}

	.t-a {
		margin-top: 50rpx;
		display: flex;
		background: #f4f4f4;
		padding: 20rpx;
		border-radius: 40rpx;

		view:nth-child(1) {
			width: 10%;
		}

		view:nth-child(2) {
			width: 80%;

			input::-webkit-input-placeholder {
				color: #f00;
			}

			input::-moz-placeholder {
				color: #f00;
			}

			/* firefox 19+ */
			input:-ms-input-placeholder {
				color: #f00;
			}

			/* ie */
			input:-moz-placeholder {
				color: #f00;
			}
		}

		view:nth-child(3) {
			width: 10%;
		}

	}





	.t-login .t-f text {
		margin-left: 8rpx;
		color: #999
	}

	.t-login .uni-input-placeholder {
		color: #000
	}


	.u-icon {
		display: inline-block;
		float: left;
	}
</style>
